This application is related to, and claims the benefit of priority to, Japanese Patent Application number 2001-097344, filed Mar. 29, 2001 in Japan, the contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a processing method for copying between data regions and a memory system for copying between logical disk and other data regions. More particularly, the present invention relates to a processing method for copying between data regions and a memory system making immediate access to a data region possible in response to an instruction to copy a data region provided in a main center to a data region provided in a supplemental center in a remote system, in which the main center and the supplemental center are disposed to communicate with a remote location.
2. Description of the Related Art
Copying of a logical disk and other data region units is executed. For example, a logical disk is an apparent disk device constructed without relation to the physical restrictions on physical disks. Accordingly, a logical disk may be constructed physically from a plurality of physical disk devices, and a plurality of logical disks may be constructed on one physical disk as well. The form that is used is determined by content and performance parameters.
Such a representative system is called a RAID (for example, RAID 0, 1, 0+1, 3 or 5) rank or a RAID group. RAID generally refers to a Redundant Arrays of Independent Disks.
Copying between physical disks in a remote system is mainly used as backup for saving data, but it is also used for various other purposes. For example, there are cases where tests are run without interrupting work. In such a case, the logical disk used in the work is copied, and the copy destination logical disk is used by the test system. Even if damage should occur to the data in the test system using the copy destination logical disk, there is thereby no effect on the work using the copy source logical disk.
Alternatively, a logical disk used in online work is copied, and the copy destination logical disk is used for batch processing. The performance of the online work using the source logical disk is thereby not affected by the batch processing.
In this manner, the number of instances where logical disk-to-disk copying is required is increasing. During the copying of the logical disks, work must be stopped. For example, it takes around 2 hours to copy 9 gigabytes (or GB). In recent environments with a 24-hour continuous operation, however, it is desired to come close to zero for the work stop time by coming close to zero for the copying time.
FIGS. 17 to 20 are explanatory diagrams of the Prior Art. FIG. 17 and FIG. 18 are explanatory diagrams of conventional separate dual volume systems. FIG. 19 is an explanatory diagram of a conventional log structure system. FIG. 20 is an explanatory diagram of a conventional concurrent copy system.
The methods below are known as logical disk data copying methods provided in conventional RAID systems.
(1) Separate Dual Volume System
In a system comprising a RAID device 91 and a host 90 as indicated in FIG. 17, when the host 90 makes an instruction to copy as indicated in FIG. 18, preparation (definition) of a copy destination volume (logical disk) 94 is executed. Next, copying to a secondary (copy destination logical disk) 94 from a primary (copy source logical disk) 93 begins (a dual state is created) in response to a dual creation start instruction. When the copying is complete (the dual status is complete), the creation of a pair is complete. When this dual status ends, an update processing request from the host 90 is reflected in the primary (copy source logical disk) 93 and the secondary (copy destination logical disk) 94. The host 90 issues a dual pair separation instruction, thereby completing the copying of the logical volume in the state at that point. As indicated in FIG. 17, separate hosts (applications) 90 and 95 can use the primary (copy source logical disk) 93 and the secondary (copy destination logical disk) 94.
As indicated in FIG. 18, the primary (copy source logical disk) 93 can be accessed even during the copy interval and the secondary (copy destination logical disk) 94 cannot be accessed during the copy interval.
(2) Log Structured File
As indicated in FIG. 19, there are logical disks A, B and C defined by the host. Each data block is stored on one physical disk 96. Each logical disk A, B and C is defined with data pointers for the physical disk 96. Accordingly, copying from the logical disk A to the logical disk B is executed by setting the pointer for the logical disk A to the pointer of the logical disk B.
Data B2 updated on the logical disk B is stored on the physical disk 96 separately from the original data. By updating the pointer for the logical disk B to the pointer for the updated data B2, the logical disk B can be updated without modifying original data A1 to A6 on the logical disk A.
This method does not accompany copying of actual data, and by setting pointers, the copy operation completes immediately.
(3) Concurrent Copy
As indicated in FIG. 20, during the copying from a copy source disk 93 to a copy destination disk 94, a host 90 reads the copy target data on a copy source disk 93 (A), and writes to a copy destination disk 94 using a data transfer function. The bitmap of the address where copying is complete is set to copy complete.
During copying, if there is an update request to an un-copied region of the copy source disk 93, that data on the copy source disk 93 is withdrawn to a side file 92 (1). The side file is set to the bitmap address portion during the withdrawal (2). Then, the copy source disk 93 is updated (3). While copying the data withdrawn to the side file 92, copy target data is read from the side file 92, and this is written to the copy destination disk 94 using a data transfer function (4). With this method, references/updates to the copy source disk 93 from the host are possible during copying.
Nevertheless, there are the following problems with the Prior Art, solved by the present invention.
(1) It is not possible to access the copy destination disk during the copy interval in the dual system in FIG. 17 and FIG. 18. Because of this, it is necessary to wait for the copying to complete to access to the copy destination disk. For example, it takes around 2 hours to copy 9 GB, so a waiting time of 2 hours occurs. Because of this, a scheduled operation is required.
(2) With the log structure system in FIG. 19, access is possible to the copy source logic disk and the copy destination logical in response to a copy instruction, but because the actual data is not copied, the advantage of a dual system with the data copied onto a separate system is not gained. More specifically, damage to the copy destination logical disk is also damage to the copy source logical disk, so if damage occurs to the copy destination physical disk, the copy source logical disc cannot be used either. Also, access to the copy destination physical disk is access to the copy source physical disk, so high speed performance through a distribution to separate disks is not obtained.
(3) With the concurrent copy system in FIG. 20, access to the copy source logical disk is possible during copying, but it is necessary to wait until copying completes to access the copy destination logical disk.
A similar problem is that to allow access from a host device, logical disk formatting was required beforehand, and until the formatting ended, access could not be made to the logical disk. The time required for the logical formatting differs according to the size of the logical volume, but it takes roughly tens of minutes to a number of hours, and during this period, data cannot be processed. With the current state of things, the time required for operations such as new installation of storage systems and increasing the logical volume of existing systems cannot be ignored.
Accordingly, an aspect of the present invention is to offer a processing method for copying between storage device data regions and a storage system such that even when actual data is copied, access is possible in a state where the copying completes immediately in response to a copy instruction.
Another aspect of the present invention is to offer a processing method for copying between storage device data regions and a storage system to allow access to a copy destination data region even during copying.
Yet another aspect of the present invention is to offer a processing method for copying between storage device data regions and a storage system to determine whether copying of an access region is complete or not, and to allow access to the copy destination data region.
A further aspect of the present invention is to offer a storage device formatting processing method, a storage system and a storage media therefore such that access is possible in a state where formatting has completed immediately in response to a format start instruction even when logical disk formatting is being executed.
The present invention solves the above-mentioned problems of the related art.
The present invention is a processing method for copying between storage device data regions for copying data in a copy source data region to a copy destination data region in response to a copy instruction. The copy method has a process for copying data in the aforementioned copy source data region to an intermediate media data region for each prescribed block unit as well as copying the data copied to the intermediate media data region to the aforementioned copy destination data region in response to a copy instruction, and a process for interrupting the aforementioned copy processing for an external access to a block in the aforementioned copy source or the aforementioned copy destination data region during the aforementioned copy processing and for processing the aforementioned access.
After determining whether the copy processing is complete for the aforementioned access target block for each region, the access processing process has the below processing processes based on that determination.
If the access is for updating a block for which copying of the copy source data region is incomplete, data stored in an access target block in the copy source data region is copied to the intermediate media data region after which the aforementioned access target block in the copy source data region is updated.
If the access is for referencing a block for which copying of the data to an intermediate media data region from a copy source data region is incomplete and for which copying to the copy destination data region is incomplete, the data in the copy source data region is referenced.
If the access is for referencing a block for which copying of data in an intermediate data region from a copy source data region is complete and for which copying to the copy destination data region is incomplete, the data in the intermediate media data region or the data in the copy source data region is referenced. When considering the processing performance of the device, the latter is generally desired, but the relative merits of the specific performance differs depending on various factors such as the existence of data in cache memory.
If access is for updating a block for which copying of data to an intermediate media data region from a copy source data region is incomplete and for which copying to the copy destination data region is incomplete, processing occurs in either one of the two ways below.
The first processing is to prohibit updating the access target block of the copy destination data region and copying to that block. The second processing is to prohibit copying from the copy source data region to the block storing data after that data in an intermediate media data region is updated.
Updating the access target block in the copy destination data region and copying to that block is prohibited if the access is for updating a block for which copying to an intermediate media data region from a copy source data region is complete and for which copying of the copy destination data region is incomplete.
With the present invention, a response of copy completion is returned immediately in response to a copy instruction, and while copying actual data, referencing and updating access to the copy source and copy destination data regions are carried out when an access request is received. Because of this, first, the copy source data region is divided into a plurality of blocks, and after copying to the intermediate media data region by divided block unit, the data is copied to the copy destination data region. If there is an access request during copying, the copy operation is interrupted and the access request is executed. The reason for providing the intermediate media is described below.
Copying from a copy source to intermediate media and copying from intermediate media to a copy destination can be executed at different times or simultaneously. The choice is determined in a trade-off between processing time and development time.
Second, the access processing changes depending on whether the access target region is a copy complete region or a copy incomplete region, and whether copying to the intermediate media is complete or not. More specifically, with reference and update access to a copy complete region, the copying is complete, so access is allowed. For access to a copy incomplete region, on the other hand, the data at the time of the copy instruction is saved while access is allowed. More specifically, for a reference access to a copy incomplete region in the copy source data region, the data is not modified, so the access is allowed directly. With an update access to a copy incomplete region in a copy source data region, a direct update causes data uncopied before the update to be lost. Because of this, the access target region of the copy source data region is copied to the copy destination data region, moving data before the update to the copy destination data region. After this, the access target region in the copy source data region is updated. Logically, then, data before the update can thereby be copied at the time of the copy instruction.
However, with a remote system making data redundant through a communication line with a main center and a secondary center disposed in remote locations, the aforementioned procedure cannot be applied without modification. This is because in a remote system, four times the time is required for transfer of data between a main center and a supplemental center compared to data transfer processing between storage devices within the same storage system. This is due to instances with a distance between the main center and supplemental system of hundreds of kilometers and to the use of general dedicated lines, etc., for communication.
Thus, when an update to a copy incomplete block in a copy source data region is processed during data copying, an operation to copy that block to the secondary center is required. Until that copy processing is complete, the update processing from the host device for the copy incomplete block in the copy source data region is caused to wait. Update processing from the host device becomes considerably delayed, and the system performance is greatly decreased.
Because of this, an intermediate media is required particularly for remote systems. When data copying from the main center to the supplemental center begins, first, copying from the copy source data region to the intermediate media data region begins. The copying is executed inside a single storage system, so even if updating of a copy incomplete block in the copy source data region such as described above is carried out during copying, copying of the block to the intermediate media will end in a comparatively short time. Because of this, the decrease in system performance is kept to a minimum, within a range that is ordinarily not a problem.
Once the copying from the copy source data region to the intermediate media region is complete, the copy source data region is released from the copy processing. Access to the copy source data region by the host device is carried out as normal. A decrease in performance for the copy source data region does not occur. Afterwards, the copy processing itself completes by executing the copying from the intermediate media to a copy destination region in the supplemental center. Copying from the copy source data region in the main center to the copy destination data region in the supplemental center is thereby physically completed.
Because the copying is not complete with an access referencing a copy incomplete block on the copy source data region logical disk, the data in that block of the copy source data region is read. Even if the block is a copy incomplete block in the copy destination data region, reference to that copy data in that region can be made, and even in a copy destination data region, it is possible to reference to data at the time of a copy instruction. If copying to the intermediate media is already complete, the data in that block of the intermediate media data region may be read.
An access for updating a copy incomplete region in a copy destination data region updates the copy destination data region with updated data. Copying of that region is then prohibited. The updated data of that region in the copy destination data region is thereby prevented from being altered through copying.
Even in this case, the aforementioned intermediate media is provided, so updating of the data block in the intermediate media region is more complete. In this case, copying of the block from the copy source data region to the intermediate media is prohibited.
In another mode of the present invention, copying between logical disks in a RAID system can be readily performed by constructing the aforementioned data region with logical disks. In yet another mode of the present invention, the aforementioned access processing process has a process for referencing the aforementioned access target region in the aforementioned copy source data region for a reference access to the aforementioned copy source data region, and a process to reference or update the aforementioned access target region in the aforementioned copy destination data region.
In yet another mode of the present invention, a process for referencing a copy incomplete region in the aforementioned copy destination data region comprises a process for copying the aforementioned access target region in the aforementioned referenced copy source data region to the aforementioned copy destination data region after referencing the aforementioned access target region in the aforementioned copy source data region. Referencing as well as copying is thereby made possible.
As an intermediate media is provided, when copying is complete to regions where the middle is difficult, that data can of course be referenced.
In another mode of the present invention, the aforementioned copy process has a process for referencing control information indicating the copy status of each of the aforementioned regions and determining the next copy region, and a process for updating control information in the aforementioned copy region when the copying in the aforementioned copy region is complete. The aforementioned access process has a process to reference the aforementioned control information and determine whether the aforementioned access target region is a copy complete region or a copy incomplete region.
Control information is provided, so even if data in the access target region is copied beforehand, re-copying of that region can be prevented. The control information is used to determine whether the access target region is a copy complete region or a copy incomplete region, so it is possible to accurately determine whether the access region is a copy complete region or a copy incomplete region.
In another mode of the present invention, the aforementioned access process has yet another process for updating control information for the aforementioned access target region when the aforementioned access target region in the aforementioned copy source data region is copied to the aforementioned copy destination data region. Using access processing, the control information thereby accurately indicates the copy status even if copying is carried out beforehand.
In another mode of the present invention, the aforementioned copy process has a process for referencing the aforementioned control information indicating the copy status of each of the aforementioned copy source data regions and determining the next copy region, a process for reading the target region in the aforementioned copy source data region into memory, a process to update the aforementioned control information after reading the aforementioned target region, and a process to write the aforementioned target region in the aforementioned memory into the aforementioned copy destination data region. By reading the target region into memory, and updating the control information, access to the copy source logical disk is enabled.
In another mode of the present invention, the aforementioned copy process has a process for referencing a bitmap indicated with a flag which indicates the copy status of each of the aforementioned regions and determining the next copy region, and a process for updating the flag in the aforementioned copy region in the aforementioned bitmap when copying of the aforementioned copy region completes. The control information is expressed in a bitmap, so it is possible to decrease the memory region occupied by the control information.
In another mode of the present invention, the aforementioned copy process has yet another process for copy completion notification in response to the aforementioned copy instruction. The access source thereby knows immediately that access is possible.
A disk storage system of the present invention has a logical disk comprising a physical disk, another logical disk comprising another physical disk, and an access control circuit for accessing specified logical disk data in response to an access instruction, and for copying to the aforementioned copy destination logical disk for each region unit divided on the copy source logical disk in response to a copy instruction.
The disk control circuit updates the aforementioned access target region on the aforementioned copy source logical disk after copying the aforementioned access target region on the aforementioned copy source logical disk to the aforementioned intermediate media for an access for updating a copy incomplete region on the aforementioned copy source logical disk, reads the aforementioned access target region on the aforementioned copy source logical disk for an access for referencing the copy incomplete region on the aforementioned copy destination logical disk, updates the aforementioned access target region on the aforementioned copy destination logical disk for an access for updating the copy incomplete region on the aforementioned copy destination logical disk, and prohibits copying of the aforementioned access target region.
As described above, access to the copy destination and copy source logical disks is thereby enabled during copying, and the host can immediately access the copy destination and copy source logical disks in response to a copy instruction. Accordingly, waiting for copying can be avoided.
It is possible to prevent a decrease in the processing performance of a copy source disk device in a remote system as well by providing an intermediate media.
Another mode of a disk storage system of the present invention has a memory to store control information indicating the copy status of each of the aforementioned regions on the aforementioned copy source logical disks, and the aforementioned control circuit references the control information in the aforementioned memory to determine whether the aforementioned access target region is a copy complete region or a copy incomplete region.
These together with other objects and advantages which will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout.